package com.shopping.service;

import com.shopping.bean.Category;
import com.shopping.bean.OrderProduct;
import com.shopping.bean.Product;
import com.shopping.util.Page;

import java.util.List;

public interface IProductService {
    int addProduct(Product product);
    int editProduct(Product product);
    int deleteProduct(int id);
    List<Product> getList(Page page, String text,String category);
    List<Product>  getChildren(int id);
    Product getProductByID(Integer id);
    int getCount(String text,String category);
    List<Product> getProductsByCategoryName(String categoryname);
    void updateStockAndSales(List<OrderProduct> orderProducts);
    List<Product> getAllProductSalesAndStocks();

}
